package cn.itlaobing.eshop.web.filter;

import cn.itlaobing.eshop.web.filter.sitemeshtag.CssJsTag;
import org.sitemesh.builder.SiteMeshFilterBuilder;
import org.sitemesh.config.ConfigurableSiteMeshFilter;

import javax.servlet.annotation.WebFilter;

/**
 * @Description:
 * @Author: WangDong
 * @Date: 2017/11/13 9:44
 */
@WebFilter("/*")
public class SiteMeshFilter extends ConfigurableSiteMeshFilter {
    @Override
    protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
        builder.addDecoratorPath("/**","/WEB-INF/views/layout/application.jsp")
                .addExcludedPath("/assets/**")
                .addTagRuleBundle(new CssJsTag());
    }
}
